]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: don't add a null desktop clone
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 3 Feb 2014 10:26:19 +0000 (11:26 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 3 Feb 2014 10:55:50 +0000 (11:55 +0100)
If there is no desktop window, getDesktopClone() returns null.
In that case, we know that no animation is needed.

Fixes a regression from b97f3a9ecf52183e86506af622a08eaa7e3846bb

https://bugzilla.gnome.org/show_bug.cgi?id=723523

js/ui/overview.js

index 061175dd31862893541dd123959458f6b8875f0c..db52c545020f40801056501a60fb7dd3f90ee4de 100644 (file)
@@ -493,8 +493,13 @@ const Overview = new Lang.Class({
     },
 
     fadeOutDesktop: function() {
-        if (!this._desktopFade.get_n_children())
-            this._desktopFade.add_child(this._getDesktopClone());
+        if (!this._desktopFade.get_n_children()) {
+            let clone = this._getDesktopClone();
+            if (!clone)
+                return;
+
+            this._desktopFade.add_child(clone);
+        }
 
         this._desktopFade.opacity = 255;
         this._desktopFade.show();